//
//  FavoriteCell.m
//  Aandelen
//
//  Created by Jin Hu on 2010/08/05.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "FavoriteCell.h"


@implementation FavoriteCell
@synthesize priceOrg,priceNow ,change,percentage,profit,unit,indicator,logo,name ;


-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(id)rid{
	if([super initWithStyle:style reuseIdentifier:rid]){
		self.textLabel.frame=CGRectMake(0, 0, 10, 40);
		
		priceNow = [[[UILabel alloc] initWithFrame:CGRectMake(120, 1, 70, 25)] autorelease];
		priceNow.font = [UIFont systemFontOfSize:22];
		priceNow.adjustsFontSizeToFitWidth=true;
		[self.contentView addSubview:priceNow];

		priceOrg = [[[UILabel alloc] initWithFrame:CGRectMake(120, 26, 70, 14)] autorelease];
		priceOrg.font = [UIFont systemFontOfSize:11];
		[self.contentView addSubview:priceOrg];
		
		
		change = [[[UILabel alloc] initWithFrame:CGRectMake(190, 3, 40, 25)] autorelease];
		change.font = [UIFont systemFontOfSize:22];
		change.adjustsFontSizeToFitWidth=true;
		[self.contentView addSubview:change];
		
		percentage = [[[UILabel alloc] initWithFrame:CGRectMake(190, 25, 40, 15)] autorelease];
		percentage.font = [UIFont systemFontOfSize:13];
		[self.contentView addSubview:percentage];
		
		profit = [[[UILabel alloc] initWithFrame:CGRectMake(230, 1, 70, 25)] autorelease];
		profit.font = [UIFont systemFontOfSize:22];
		profit.adjustsFontSizeToFitWidth=true;
		[self.contentView addSubview:profit];
		
		unit = [[[UILabel alloc] initWithFrame:CGRectMake(230, 25, 70, 15)] autorelease];
		unit.font = [UIFont systemFontOfSize:8];
		//percentage.bounds = CGRectMake(0, 30, 40, 25);
		[self.contentView addSubview:unit];
		
		name = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 120, 40)] autorelease];
		name.font = [UIFont systemFontOfSize:20];
		//percentage.bounds = CGRectMake(0, 30, 40, 25);
		[self.contentView addSubview:name];
 		logo = [[[UIImageView  alloc] initWithFrame:CGRectMake(2, 2, 110, 36)] autorelease];
		[self.contentView addSubview:logo];
		indicator = [[[UIImageView  alloc] initWithFrame:CGRectMake(300, 10, 20, 20)] autorelease];
		[self.contentView addSubview:indicator];
	}
	return self;
}

- (void)dealloc {
    [super dealloc];
}


@end
